In recent years, an image processing device having a function of accumulating an image as electronic data, for example, a digital copying machine, has become prevalent. An increase in capacity of a memory device including a hard disk and reduction in cost of the memory device are considered to have influenced the prevalence of such an image processing device.
Such an image processing device includes an image processing device that performs image processing with the use of attribute data indicative of an attribute of a pixel constituting an image. One example of the image processing device is disclosed in Japanese Unexamined Patent Publication No. 211316/2001 (Tokukai 2001-211316) (published on Aug. 3, 2001). An image processing device as disclosed in Japanese Unexamined Patent Publication No. 211316/2001 accumulates image data inputted via a scanner and attribute data (flag data) generated from the image data in an auxiliary storage device such as a hard disk. These image data and attribute data are retrieved from the hard disk when the image is printed.
The attribute data is usually data indicative of an attribute (character, photograph, or the like) of each pixel, and used at a timing at which the image is printed or the like. In the following explanation, an attribute of a pixel is information, provided to each data, that indicates a region (for example, character region, photograph region, background region, or the like) to which the subject pixel belongs in the image.
One example of image processing is processing to switch a dither matrix in accordance with an attribute in a case where tone is reduced at printing. Note that information, other than information indicating a region to which a pixel belongs, may be attribute data as long as the information is useful in the image processing in a subsequent process.
Hereinafter, a term “attribute data” expresses data, indicative of an attribute of each pixel in an image or each region included in the image, which data is useful in such image processing.
The following explains what the attribute data is like, with reference to FIG. 28. FIG. 28 is a diagram illustrating one example of an input image 101. Suppose, for instance, that, as illustrated in FIG. 28, the input image 101 made of a photograph region, a character region, and a background region is provided. FIG. 29 is a diagram magnifying a sectional region 102 that is a part of the input image 101, for purpose of illustration.
The sectional region 102 is made of a character region 201 (made of pixels constituting each character of “UK”), a photograph region 202, and a background region 203. FIG. 30 is attribute data corresponding to the sectional region 102. The attribute data itself has a structure as an image data. Each pixel in the attribute data physically corresponds to a pixel of the input image data.
A region filled with the same pattern, as illustrated in FIG. 30, has the same pixel value (attribute value). Suppose, for instance, that, when a pixel belongs to a region 301 in which a horizontally-striped pattern is drawn, a pixel value of the pixel is 1. Moreover, when a pixel belongs to a region 302 in which a diagonally-striped pattern is drawn, a pixel value of the pixel is supposed to be 2. Further, when a pixel belongs to a region 303 in which a halftone dot pattern is drawn, a pixel value of the pixel is supposed to be 0. Provided that all values of the attribute data corresponding to the input image 101 is expressed by the values shown in FIG. 30, the values of the attribute data corresponding to the input image 101 can be expressed with three values.
Note that, although a resolution of this attribute data is arranged to be the same as that of the input image data in FIG. 30, the resolution of the input image data does not necessarily corresponds to the resolution of the attribute data as long as a category, to which each pixel in the image indicated by the input image data belongs, can be determined by the attribute data.
It is necessary to increase a storage region in order to accumulate image data of images with a large number of pages. However, in a case where the storage region cannot be increased, it is necessary to reduce a capacity necessary for each page.
A resolution of an image or the number of pixels of the image may be reduced, for reducing the storage region for an image per page. However, this is not preferable because information of the image may be lost when data is simply thinned.
This applies to both of the image data itself and the attribute data in the same way. However, in the case of image data, much research and development have been carried out with respect to a method of shrinking or expanding the image without deteriorating image quality. One example of the method is described in “New Edition: Image Analysis Handbook” (Tokyo University Press, published on Sep. 10, 2004, pp. 1350-1373).
Such a method is applicable basically when the pixel value of the image data does not have a specific meaning. On the other hand, different from the above case, in the attribute data, each pixel value (attribute value) itself has a meaning.
Suppose, for instance, that a specific meaning is given to a pixel value of attribute data, as illustrated in FIG. 31. FIG. 31 is a table illustrating how an attribute of a pixel of image data corresponds to a pixel value indicative of the attribute. Here, present two pixels respectively have a pixel value “3” (halftone dot) and a pixel value “5” (photograph), and an average value taken at the time of shrinking the attribute data in consideration of the present two pixels becomes “4”, which is indicative of a color character. This shows that processing of shrinking the attribute data by calculating an average value of pixel values is meaningless.
Accordingly, Japanese Unexamined Patent Publication No. 211316/2001 (Tokukai 2001-211316) discloses a method of preventing loss of a specific value (e.x. 1) by using a nearest neighbor method and a logical addition method together at the time of shrinking the attribute data (flag data), a method of outputting 1 in a case where an appearance frequency of a specific value (e.x. 1) is counted around a target pixel and a result of the counting becomes equal to or more than a predetermined value, or the like.
However, according to the method as described in Japanese Unexamined Patent Publication No. 211316/2001, it is difficult to leave a pixel value that is desired to reliably remain in the attribute data. For example, according to the method based on the appearance frequency of the pixel value, possibility that a pixel value that is desired to remain remains is low in a case where the pixel value appears at a low appearance frequency.
Moreover, in a case where the method based on logical addition is applied to a multi-valued image that is made of a plurality of bit planes, all bits of the pixel value that is desired to reliably remain should be “1”. Otherwise, the bits constituting the pixel value do not always remain depending on the bit plane. Accordingly, the pixel value that is originally desired to be stored is not ensured to remain. Therefore, according to the method based on logical addition, it is not easy to change a pixel value desired to remain. It is also difficult to give high priority to a plurality of pixel values.
Another problem is that, in a case where the attribute data is split into bit planes, encoding efficiency may deteriorate depending on how the pixel value is determined.
This point is explained below. Suppose, for instance, that, in a case where pixel values of the attribute data is given meanings, as illustrated in FIG. 31, a document made of a background and a black character/line work is inputted. When pixel values indicative of these two attributes are split into bit planes, the pixel values become different in all three bit planes. Accordingly, although, in the case of a text document, it is highly likely that two kinds of pixel values occupy majority of the document, it is not possible to produce bit planes having the same value in all area or bit planes close to the bit planes having the same value in all area. Therefore, it is not possible to increase encoding efficiency of the region separation map.
FIG. 32 shows a table in which the pixel value of the black character/line work is switched to a pixel value of a color character/line work, and vice versa. In this case, the problem in the case mentioned above can be solved. However, in the case of a color document, because it is likely that the color character/line work and background concurrently exist at a high appearance frequency, a problem similar to the problem mentioned above occurs. Therefore, it is not possible to increase encoding efficiency of the attribute data.
Japanese Unexamined Patent Publication No. 134570/1992 (Tokukai 4-134570, published on May 8, 1992) discloses a method of generating a shrank image that faithfully reproduces an original image. However, this patent application has no description concerning reduction of attribute data.